Skip to content

Implement serial communication functions and refactor existing code#19

Open
Katze719 wants to merge 9 commits into
mainfrom
upgrade/cpp-core-v2-linux
Open

Implement serial communication functions and refactor existing code#19
Katze719 wants to merge 9 commits into
mainfrom
upgrade/cpp-core-v2-linux

Conversation

@Katze719

Copy link
Copy Markdown
Member
  • Added new functions for serial communication including:

    • serialOutBytesTotal
    • serialOutBytesWaiting
    • serialReadLine
    • serialReadUntil
    • serialReadUntilSequence
    • serialSendBreak
    • serialSetBaudrate
    • serialSetDataBits
    • serialSetDtr
    • serialSetFlowControl
    • serialSetParity
    • serialSetReadCallback
    • serialSetRts
    • serialSetStopBits
    • serialSetWriteCallback
  • Refactored serialRead and serialWrite functions to use a common implementation (readImpl and writeImpl).

  • Updated error handling to use new status code definitions.

  • Modified unit tests to reflect changes in error codes and added new tests for the newly implemented functions.

  • Ensured consistent naming and usage of status codes across the codebase.

Katze719 and others added 8 commits June 17, 2026 22:36
- Added new functions for serial communication including:
  - `serialOutBytesTotal`
  - `serialOutBytesWaiting`
  - `serialReadLine`
  - `serialReadUntil`
  - `serialReadUntilSequence`
  - `serialSendBreak`
  - `serialSetBaudrate`
  - `serialSetDataBits`
  - `serialSetDtr`
  - `serialSetFlowControl`
  - `serialSetParity`
  - `serialSetReadCallback`
  - `serialSetRts`
  - `serialSetStopBits`
  - `serialSetWriteCallback`

- Refactored `serialRead` and `serialWrite` functions to use a common implementation (`readImpl` and `writeImpl`).
- Updated error handling to use new status code definitions.
- Modified unit tests to reflect changes in error codes and added new tests for the newly implemented functions.
- Ensured consistent naming and usage of status codes across the codebase.
@Katze719 Katze719 marked this pull request as ready for review June 22, 2026 16:36
@Katze719 Katze719 requested a review from Mqxx June 22, 2026 16:36

@Mqxx Mqxx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not done yet with all files

uses: './.github/workflows/test_unit_cpp.yml'
with:
artifact-name: cpp_bindings_linux_tests
artifact-name: libcpp_bindings_linux

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change? Isn't this just the test file?

Comment thread .github/workflows/test_deno.yml
Comment thread .github/workflows/test_deno.yml
Comment thread src/detail/posix_helpers.hpp
Comment thread src/detail/posix_helpers.hpp Outdated
Comment thread src/serial_abort_read.cpp Outdated
Comment thread src/serial_abort_write.cpp Outdated
Comment thread src/serial_clear_buffer_in.cpp Outdated
Comment thread src/serial_set_dtr.cpp Outdated
Comment thread src/serial_set_flow_control.cpp Outdated
Comment thread src/serial_set_parity.cpp Outdated
Comment thread src/serial_set_rts.cpp Outdated
Comment thread src/serial_set_stop_bits.cpp Outdated
@Katze719 Katze719 requested a review from Mqxx June 27, 2026 17:32
}
}

template <typename Ret>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is Ret? I assume ReturnType? Or something else? Please choose a respective type name. Please also check for this in all other files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants